import React from "react"

import { Breadcrumb, Menu, PageHeader ,message, Button, Space } from 'antd';

import { withRouter } from 'react-router-dom';






class Header extends React.Component{
  constructor(props){
    super(props)
  }
  

  error = () => {
    message.error('登陆看看就可以了, 咋了?还想盗号!');
  };
  // 点击修改密码
  mmp(){

  }

  // 点击退出
  goLogin(){
    localStorage.removeItem('token')
    localStorage.removeItem('uid')
    this.props.history.replace('/login')
  }
  render(){
    const menu = (
      <Menu>
        <Menu.Item>
          <a rel="noopener noreferrer" onClick={this.error.bind(this)}>
            修改密码
          </a>
        </Menu.Item>
        <Menu.Item>
          <a rel="noopener noreferrer" onClick={this.goLogin.bind(this)}>
            退出
          </a>
        </Menu.Item>
        
      </Menu>
    );
    return(
      <div>
        


  <PageHeader
    className="site-page-header"
    title="|| 用户管理"
    extra = {<Breadcrumb>
    <Breadcrumb.Item overlay={menu}>
      个人中心
    </Breadcrumb.Item>
  </Breadcrumb>}
    style ={{background:"#fff"}}
  />,
     
      </div>
  )
    
  }

}

export default withRouter(Header)